﻿<UserControl x:Class="Atlanchim.Crm.Mui.Pages.Contacts.PageViewContact"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:lmondeilConverters="clr-namespace:Atlanchim.Crm.Mui.Pages.Contacts"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="20"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--Entête-->
        <TextBlock Text="Contact" Style="{StaticResource Heading2}" />

        <!--Actions-->
        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <mui:ModernButton Content="Modifier"
                          Command="NavigationCommands.GoToPage" CommandParameter="{Binding Path=EditUrl}"
                          IconData="{DynamicResource LmondeilEditButtonPath}" Foreground="{DynamicResource LmondeilEditButtonColor}" />
            <mui:ModernButton Content="Supprimer"
                          Command="ApplicationCommands.Delete" CommandParameter="{Binding}"
                          IconData="{DynamicResource LmondeilDeleteButtonPath}" Foreground="{DynamicResource LmondeilDeleteButtonColor}" 
                          Margin="10, 0"/>
        </StackPanel>

        <!--informations sur le Contact-->
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="80"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Rectangle Grid.Column="0" Grid.RowSpan="7" Fill="{DynamicResource ResourceKey=ContactColor}"/>

            <TextBlock Text="Nom" Grid.Row="0" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Path=Contact.Nom, FallbackValue='[Nom]'}" Grid.Row="0" Grid.Column="2" 
                     VerticalAlignment="Center" FontSize="16" Style="{DynamicResource ReadOnlyBextBox}"/>

            <TextBlock  Text="Prénom" Grid.Row="1" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Path=Contact.Prenom, FallbackValue='[Prénom]'}" 
                       Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}" />

            <TextBlock  Text="Sexe" Grid.Row="2" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Path=Contact.Sexe, FallbackValue='[Sexe]'}" 
                       Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}" />

            <TextBlock  Text="Langue" Grid.Row="3" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Path=Contact.Langue, FallbackValue='[Langue]'}" 
                       Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}" />

            <TextBlock  Text="Fonction" Grid.Row="4" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Contact.Fonction, FallbackValue=[Fonction]}" 
                       Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}" />

            <TextBlock  Text="Origine" Grid.Row="5" Grid.Column="0"
                     VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" />
            <TextBox Text="{Binding Contact.Origine, FallbackValue=[Origine]}" 
                       Grid.Row="5" Grid.Column="2" VerticalAlignment="Center" Style="{DynamicResource ReadOnlyBextBox}" />

            <TextBlock  Text="Commentaires" Grid.Row="6" Grid.Column="0"
                     VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,8,10,0" />
            <ScrollViewer Margin="0, 8, 0, 0" Grid.Row="6" Grid.Column="2" >
                <TextBox Text="{Binding Path=Contact.Commentaire, FallbackValue='[Commentaire]'}" Style="{DynamicResource ReadOnlyBextBox}" />
            </ScrollViewer>

        </Grid>

        <!--Informations connexes-->
        <Grid Grid.Row="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <mui:ModernTab Layout="Tab" Grid.Row="1" Links="{Binding Path=TabLinks}" SelectedSource="{Binding Path=ActionsListUrl}"/>
        </Grid>

    </Grid>
</UserControl>
